package com.hackerrank.challenges.randomnumbergenerator;

import java.util.Scanner;

public class Solution {
	public static int GCD(int n1, int n2) {
		return GCDmm(java.lang.Math.min(n1, n2), java.lang.Math.max(n1, n2));
	}
	private static int GCDmm(int m, int M) {
		if(m == 0)
			return M;
		return GCDmm(M % m, m);
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T = in.nextInt();
		for(int t = 0; t < T; t++) {
			int A = in.nextInt(), B = in.nextInt(), C = in.nextInt(), AB = A + B, m = Math.min(A, B), M = Math.max(A,  B), n, d;
			if(C >= AB) {
				n = d = 1;
			} else if(C >= A && C >= B) {
				n = 2 * C * AB - (A * A + B * B + C * C);
				d = 2 * A * B;
			} else if(C <= A && C <= B) {
				n = C * C;
				d = 2 * A * B;
			} else {
				n = 2 * C - m;
				d = 2 * M;
			}
			int g = GCD(n, d);
			n /= g;
			d /= g;
			System.out.println(n + "/" + d);
		}
	}
}
